<?php
/**
 * Created by Zhy
 * User: Zhy
 * Date: 2023/12/8
 * Time: 15:43
 */

namespace app\api\controller;

use app\api\model\Other AS otherModel;
use app\api\validate\IdMustPositiveInteger;

class Other extends Base
{
    /**
     * 其它项
     * id    1 保修政策   2 用户协议   3 隐私协议
     * @return \think\response\Json
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function other(){
        $id = input('id');
        $result = (new IdMustPositiveInteger())->goCheck();
        if($result['status'] == 0) return json(['status' => 0, 'msg' => $result['msg']]);
        $OTHER = new otherModel();
        $data = $OTHER::otherContent($id);
        return json(['status' => 200, 'msg' => '', 'data' => $data]);
    }
}